package cn.zhaozhiqi.service.impl;

import cn.zhaozhiqi.domain.Student;
import cn.zhaozhiqi.mapper.StudentMapper;
import cn.zhaozhiqi.service.IStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements IStudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public List<Student> getAll() {
        List<Student> list = studentMapper.getAll();
        return list;
    }

    @Override
    public void insert(Student student) {
        studentMapper.insert(student);
    }

    @Override
    public void update(Student student) {
        studentMapper.update(student);
    }



    @Override
    public void deleteById(Long id) {
        studentMapper.deleteById(id);
    }

    @Override
    public void addAllstudent(List<Student> students) {
        studentMapper.addAllStudent(students);
    }


}
